<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        span{
            display:block;
            margin-left: auto;
            margin-right: auto;
            background: red;
            width:100px;
        }
        img{
            display: block;
            margin-left: auto;
            margin-right: auto;
        }
    </style>
</head>
<body>
    <span>span</span>
    <br>
    <img src="images/icon1.png" alt="">
</body>
</html>